package org.examplexx.mytestwebapplication.Mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.examplexx.mytestwebapplication.pojo.Emp;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface EmpMapper {
//    @Select("select count(*) from user")
//    public Long count();
//    @Select("select * from user limit #{start},#{Pagesize}")
//    public List<Emp> page(Integer start, Integer Pagesize);
//    pagehelper实现分页查询
//    @Select("select * from user")
    List<Emp> list(String realname, Integer gender, LocalDateTime entrytime, LocalDateTime endtime);
    void delete(List<Integer>ids);

    @Insert("insert into user (username, password, realname, telphone, entrytime,gender) VALUES (#{username},#{password},#{realname},#{telphone},now(),#{gender})")
    void insert(Emp emp);
}
